package com.sunlg.smarthome.contract;

import com.sunlg.smarthome.base.IBasePresenter;
import com.sunlg.smarthome.base.IBaseView;
import com.sunlg.smarthome.data.entity.Curtain;

import java.util.List;

/**
 * Created by sunlg on 2017/5/3.
 */

public interface CurtainContract {
    interface CurtainView extends IBaseView {
        void unfoldSuccess();
        void foldSuccess();
        void stopSuccess();
    }

    interface CurtainListView extends IBaseView {
        void showNoneCurtainText();
        void hideNoneCurtainText();
        void showCurtainList(List<Curtain> curtainList);
    }

    interface CurtainPresenter extends IBasePresenter<CurtainView> {

        /**
         * 展开窗帘
         * @param curtainId
         * @param level
         */
        void unfold(int curtainId, int level, int speed);

        /**
         * 收缩窗帘
         * @param curtainId
         */
        void fold(int curtainId, int level, int speed);

        /**
         * 停止展开或收缩
         * @param curtainId
         */
        void stop(int curtainId);
    }

    interface CurtainListPresenter extends IBasePresenter<CurtainListView> {
        void addCurtain(Curtain curtain);
        void deleteCurtain(int curtainId);
        void loadAll();
    }
}
